home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Mathematics / Math Animator / card_4051.txt < prev    next >
Encoding:
Text File  |  1988-04-24  |  4.2 KB  |  208 lines

  1. -- card: 4051 from stack: in
  2. -- bmap block id: 42681
  3. -- flags: 0000
  4. -- background id: 3636
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=12 top=308 right=329 bottom=97
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Recalculate
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   choose line tool
  23.   put 0 into c
  24.   repeat with c = 1 to number of cards
  25.     go to card c
  26.     put "FRAME:" & c & " of " & number of cards
  27.     DoMenu Select All
  28.     DoMenu Clear Picture
  29.  
  30.     put 250 into cx
  31.     put 150 into cy
  32.     put (line 1 of card field values of card 1) - c * (line 3 of card field values of card 1) into dt
  33.     put (line 2 of card field values of card 1) + c * (line 3 of card field values of card 1) into dp
  34.     put 175 into size
  35.     put 0 into t
  36.     put 0 into p
  37.     put 0 into x
  38.     put 0 into y
  39.     put 0 into dx
  40.     put 0 into dy
  41.     repeat until t > line 4 of card field values of card 1
  42.       put sin(t)*size into x
  43.       put cos(p)*size/1.5 into y
  44.       drag from round(x+cx),round(y+cy) to round(x/1.1+cx), round(y/1.1+cy)
  45.       put t+dt into t
  46.       put p+dp into p
  47.     end repeat
  48.   end repeat
  49.  
  50.   go to card 1
  51.   choose browse tool
  52.   hide message box
  53. end mouseUp
  54.  
  55.  
  56.  
  57. -- part 2 (button)
  58. -- low flags: 00
  59. -- high flags: 8003
  60. -- rect: left=189 top=303 right=335 bottom=302
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 1
  64. -- font id: 0
  65. -- text size: 12
  66. -- style flags: 0
  67. -- line height: 16
  68. -- part name: Show all cards!
  69. ----- HyperTalk script -----
  70. on mouseUp
  71.   show all cards
  72. end mouseUp
  73.  
  74.  
  75.  
  76. -- part 4 (field)
  77. -- low flags: 00
  78. -- high flags: 0000
  79. -- rect: left=454 top=228 right=294 bottom=506
  80. -- title width / last selected line: 0
  81. -- icon id / first selected line: 0 / 0
  82. -- text alignment: 0
  83. -- font id: 3
  84. -- text size: 12
  85. -- style flags: 0
  86. -- line height: 16
  87. -- part name: values
  88.  
  89.  
  90. -- part 5 (field)
  91. -- low flags: 01
  92. -- high flags: 0001
  93. -- rect: left=392 top=228 right=294 bottom=453
  94. -- title width / last selected line: 0
  95. -- icon id / first selected line: 0 / 0
  96. -- text alignment: 0
  97. -- font id: 3
  98. -- text size: 12
  99. -- style flags: 0
  100. -- line height: 16
  101. -- part name: labels
  102.  
  103.  
  104. -- part 6 (field)
  105. -- low flags: 01
  106. -- high flags: 0000
  107. -- rect: left=403 top=208 right=226 bottom=498
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 0 / 0
  110. -- text alignment: 0
  111. -- font id: 3
  112. -- text size: 12
  113. -- style flags: 256
  114. -- line height: 16
  115. -- part name: 
  116.  
  117.  
  118. -- part 7 (button)
  119. -- low flags: 00
  120. -- high flags: 8003
  121. -- rect: left=391 top=308 right=330 bottom=491
  122. -- title width / last selected line: 0
  123. -- icon id / first selected line: 0 / 0
  124. -- text alignment: 1
  125. -- font id: 0
  126. -- text size: 12
  127. -- style flags: 0
  128. -- line height: 16
  129. -- part name: Edit equations
  130. ----- HyperTalk script -----
  131. on mouseUp
  132.   edit script of button recalculate
  133. end mouseUp
  134.  
  135.  
  136.  
  137. -- part 8 (button)
  138. -- low flags: 00
  139. -- high flags: 2000
  140. -- rect: left=16 top=31 right=65 bottom=55
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 14767 / 14767
  143. -- text alignment: 1
  144. -- font id: 0
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: Help
  149. ----- HyperTalk script -----
  150. on mouseUp
  151.   show card field intro
  152. end mouseUp
  153.  
  154.  
  155.  
  156. -- part 9 (field)
  157. -- low flags: 01
  158. -- high flags: 0004
  159. -- rect: left=67 top=36 right=287 bottom=393
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 0 / 0
  162. -- text alignment: 0
  163. -- font id: 3
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: intro
  168. ----- HyperTalk script -----
  169. on mouseup
  170.   hide card field intro
  171. end mouseup
  172.  
  173.  
  174.  
  175. -- part contents for card part 5
  176. ----- text -----
  177. DeltaT1:
  178. DeltaT2:
  179. DeltaC:
  180. MaxT1:
  181.  
  182.  
  183.  
  184.  
  185.  
  186. -- part contents for card part 4
  187. ----- text -----
  188. 1.047
  189. 1.047
  190. .0005
  191. 132
  192.  
  193. -- part contents for card part 6
  194. ----- text -----
  195. Constants
  196.  
  197. -- part contents for card part 9
  198. ----- text -----
  199.  
  200. This stack is for generating and animating pieces of mathematical art.
  201.  
  202. Click on "Show all cards"  to see the cartoon.
  203.  
  204. "Recalculate" draws the frames (caution, it is rather slow).
  205.  
  206. "Edit equations" allows you to manipulate the script which recalculates.  It draws its input from the constants box.
  207.  
  208. This stack was created in haste and abandon by James Bach.